Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only call .eval if training #261

Merged
merged 1 commit into from
May 17, 2024
Merged

Only call .eval if training #261

merged 1 commit into from
May 17, 2024

Conversation

joeyballentine
Copy link
Member

Turns out, calling .eval isn't a noop. It takes a very small amount of time to do what it does (under 1ms), but it still does it every time. We can save this op by just checking if the model is in training mode first. If it is, then we can .eval it. If it isn't, we can save this.

@RunDevelopment RunDevelopment merged commit 144090e into main May 17, 2024
8 checks passed
@RunDevelopment RunDevelopment deleted the no-auto-eval branch May 17, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants